我看书斋[书].js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. var rule = {
  2. 类型: '小说',//影视|听书|漫画|小说
  3. title: '我看书斋[书]',
  4. host: 'https://www.5ccc.net/',
  5. url: '/class/fyclass_fypage.html',
  6. searchUrl: '/search/**',
  7. searchable: 2,
  8. quickSearch: 0,
  9. filterable: 1,
  10. filter: '',
  11. filter_url: '',
  12. filter_def: {},
  13. headers: {
  14. 'User-Agent': 'MOBILE_UA',
  15. },
  16. timeout: 5000,
  17. class_parse: '.nav-menu-items&&li;a&&Text;a&&href;class/(.*?)\.html',
  18. cate_exclude: '',
  19. play_parse: true,
  20. lazy: $js.toString(() => {
  21. let html = request(input);
  22. let title = pdfh(html, 'h1&&Text').split('(')[0].trim();
  23. // let content = pdfh(html, '#chaptercontent&&Html').replace(/<br>/g, '\n').replace(/\n\n/g, '\n');
  24. let content = pdfh(html, '#chaptercontent&&Html').replace(/\n/g, "").split("<br>").filter(v => v).slice(0).join("\n");
  25. let nextUrl = pd(html, '.bottem1&&a:contains(下一页)&&href', MY_URL);
  26. //log(nextUrl);
  27. if (nextUrl && nextUrl != MY_URL) {
  28. let nextHtml = request(nextUrl);
  29. let nextContent = pdfh(nextHtml, '#chaptercontent&&Html').replace(/\n/g, "").split("<br>").filter(v => v).slice(0).join("\n");
  30. content += nextContent;
  31. }
  32. let ret = JSON.stringify({
  33. title,
  34. content
  35. });
  36. input = {parse: 0, url: 'novel://' + ret, js: ''};
  37. }),
  38. double: true,
  39. 推荐: '.content&&div.module;div.module-item;*;*;*;*;*',
  40. 一级: '.module-list:eq(-1)&&div.module-item;a&&title;img&&data-original;.module-item-caption&&Text;a&&href;.book-text&&Text',
  41. 二级: {
  42. title: 'h1&&Text;.book-tag-icon&&Text',
  43. img: 'img.lazyload&&src',
  44. desc: '.book-info-item&&Text',
  45. content: '.vod_content&&Text',
  46. tabs: 'h1',
  47. lists: '#chapterlist&&a',
  48. tab_text: 'body&&Text',
  49. list_text: 'body&&Text',
  50. list_url: 'a&&href',
  51. list_url_prefix: '',
  52. },
  53. 搜索: '.module-list&&div.module-search-item;h3&&Text;*;.book-info-actor&&a&&Text;*;*',
  54. }